$(function(){
		if ($.cookie('easyuiThemeName')) {
			parent.changeThemeFun($.cookie('easyuiThemeName'));
		}
		toQuery();
})

function toQuery(){
	$.ajax({
		   type: "POST",
		   url: "showUserDxTxList",
		   data: "",
		   success: function(msg){
			$("#entity_id").val(msg.emp.id);
			$('#keyname').val(msg.emp.keyName);
			$("input[name='employeeBean.mjdxtx'][value='"+msg.emp.mjdxtx+"']").attr('checked',true);
			$("input[name='employeeBean.kqdxtx'][value='"+msg.emp.kqdxtx+"']").attr('checked',true);
			$("input[name='employeeBean.xfdxtx'][value='"+msg.emp.xfdxtx+"']").attr('checked',true);
			$("input[name='employeeBean.xcdxtx'][value='"+msg.emp.xcdxtx+"']").attr('checked',true);
			$('#mjdxtx1').attr('disabled','disabled');	
			$('#mjdxtx2').attr('disabled','disabled');	
			$('#kqdxtx1').attr('disabled','disabled');	
			$('#kqdxtx2').attr('disabled','disabled');
			$('#xcdxtx1').attr('disabled','disabled');	
			$('#xcdxtx2').attr('disabled','disabled');
			$('#xfdxtx1').attr('disabled','disabled');	
			$('#xfdxtx2').attr('disabled','disabled');
			$('#save').attr('disabled','disabled');
		   }
	});
}

//点击编辑按钮
function edit(){
	$('#mjdxtx1').removeAttr('disabled');
	$('#mjdxtx2').removeAttr('disabled');
	$('#kqdxtx1').removeAttr('disabled');
	$('#kqdxtx2').removeAttr('disabled');
	$('#xcdxtx1').removeAttr('disabled');
	$('#xcdxtx2').removeAttr('disabled');
	$('#xfdxtx1').removeAttr('disabled');
	$('#xfdxtx2').removeAttr('disabled');
	$('#save').removeAttr('disabled');
}


/**
* 修改个人消费参数
* @return
*/
function savaList(){
	var url = "updateUserDxTxList?" +encodeURI($("#dataForm").ajaxForm().formSerialize());
	$.post(url,function(json){
		if(json.flag){
			$.messager.alert('信息框','修改信息成功!');

			toQuery();
			
		}else{
			$.messager.alert('信息框','修改信息失败!');
		}
	})
}